package com.zhouyi.meihuayishu.controller;

import com.zhouyi.meihuayishu.pojo.Users;
import com.zhouyi.meihuayishu.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author HhaoAn
 * @date 2025年03月31日 18:05
 */
@RestController
@CrossOrigin//支持跨域请求
@RequestMapping("/users")
public class UsersController {
    @Autowired
    private UsersService usersService;

//    http://localhost:8080/meihuayishu/users/getAll
    @RequestMapping("/getAll")
    public String getAll(Integer user_id) {
        return usersService.getAll(user_id).toString();
    }

}
